<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>04_面试题</title>
</head>
<body>
<!-- 

-->
<script>
// 面试题：1  先执行变量提升，再执行函数提升
function a() {}
var a;
console.log(typeof a) // function

// 面试题：2
if(!(b in window)) {
    var b = 1
}
console.log(b) // undefined

// 面试题：3
/*
    实际过程：
    var c
    function c(c) {
        var c
        console.log(c)
        c = 3
    }
    c = 1
    c(2)
*/
var c = 1;
function c(c) {
    console.log(c)
    var c = 3
} 
c(2) // Uncaught TypeError: c is not a function
</script>
</body>
</html>